import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import axios from 'axios'
import VueAxios from 'vue-axios'
import { Button } from 'ant-design-vue';
Vue.use(Button);
import { Avatar } from 'ant-design-vue';
Vue.use(Avatar);
import { Menu } from 'ant-design-vue';
Vue.use(Menu);
import { Icon } from 'ant-design-vue';
Vue.use(Icon);
import { Dropdown } from 'ant-design-vue';
Vue.use(Dropdown);
import { Carousel } from 'ant-design-vue';
Vue.use(Carousel);
import { Table } from 'ant-design-vue';
Vue.use(Table);
import { Popconfirm } from 'ant-design-vue';
Vue.use(Popconfirm);
import { Input } from 'ant-design-vue';
Vue.use(Input);
import { Modal } from 'ant-design-vue';
Vue.use(Modal);
import { Form } from 'ant-design-vue';
Vue.use(Form);
import { Message } from 'ant-design-vue'
Vue.use(Message);
Vue.prototype.$message = Message
import { Tabs } from 'ant-design-vue'
Vue.use(Tabs);
import { Card } from 'ant-design-vue'
Vue.use(Card);
import { Tree } from 'ant-design-vue'
Vue.use(Tree);
import { Upload } from 'ant-design-vue'
Vue.use(Upload);
import { Select } from 'ant-design-vue'
Vue.use(Select);
import { Comment } from 'ant-design-vue'
Vue.use(Comment);
//element-ui CSS
import 'element-ui/lib/theme-chalk/index.css'
import ElementUI from 'element-ui'
Vue.use(ElementUI)
// 视频组件
import VideoPlayer from 'vue-video-player'
require('video.js/dist/video-js.css')
require('vue-video-player/src/custom-theme.css')
Vue.use(VideoPlayer)



axios.defaults.baseURL = '/api'
// 接口错误拦截
axios.interceptors.response.use(/* 业务拦截(status==200) */function(response){
    let res = response.data
    if(response.status == 200){
        console.log(response)
      return  res.data
    }else{
        alert(res.msg)
        return Promise.reject(res)
      }
  })
Vue.use(VueAxios,axios)
Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
